Make_Get_and_Set_Functions.bsh - a BeanShell macro for
the jEdit text editor that creates simple get() and set()
methods for the variables on selected lines.
Copyright (C) 2004 Thomas Galvin - software@thomas-galvin.com
based on Make_Get_and_Set_Methods.bsh by John Gellene
This macro will work on multiple selected lines; for instance,
selecting
<code>
public int foo;
public int bar;
</code>
and running the macro will produce get and set functions for both
variables, along with comments. This macro produces c-style
functions, unless the buffer is in java mode.
Modifications by Dale Anson, Dec 2008:
1. Allows variable declarations to have an initial assignment, like
<code>
public int foo = 1;
public int bar = 2;
</code>
2. Allows multiple variables on same line, like
<code>
public int foo, bar;
</code>
3. Use line separator as set in buffer properties rather than always using \n.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
// Localization
final static String DONE = jEdit.getProperty("macro.rs.MakeGetAndSetMethods.GenerateCode.label", "Generate Code");
final static String CANCEL = jEdit.getProperty("common.cancel");
final static String CreateGetMethodsLabel = jEdit.getProperty("macro.rs.MakeGetAndSetMethods.CreateGetMethods.label", "Create Get Methods");
final static String CreateSetMethodsLabel = jEdit.getProperty("macro.rs.MakeGetAndSetMethods.CreateSetMethods.label", "Create Set Methods");
final static String CreateGetandSetMethodsLabel = jEdit.getProperty("macro.rs.MakeGetAndSetMethods.CreateGetandSetMethods.label", "Create Get and Set Methods");